/**
   * Develop with a Github issue as the assignment and open a pull request
   * @param githubToken Github Token with permissions to write issues and contents
   * @param issueID Github issue number
   * @param repository Github repository url
   * @param source The source directory
   */
  @func()
  async developIssue(
    githubToken: Secret,
    issueID: number,
    repository: string,
    @argument({ defaultPath: '/' }) source: Directory
  ): Promise<string> {
    // Get the Github issue
    const issueClient = dag.githubIssue({ token: githubToken })
    const issue = issueClient.read(repository, issueID)

    // Get information from the Github issue
    const assignment = await issue.body()

    // Solve the issue with the Develop agent
    const feature = await this.develop(assignment, source)

    // Open a pull request
    const title = await issue.title()
    const url = await issue.url()
    const body = `${assignment}\n\nCloses ${url}`
    const pr = issueClient.createPullRequest(repository, title, body, feature)

    return await pr.url()
  }
